<extend name="Public/common"/>
<block name="othercss">
 <script type="text/javascript">
            var url_get_address = "{:U('get_address')}";
			var url_member_address = "{:U('Member/address')}";
            var url_del_address = "{:U('Member/address_del')}";
            var url_add_address = "{:U('Member/address_add',array('type'=>'ajax'))}";
             var url_address_edit = "{:U('Member/address_edit')}?";//添加收货地址请求地址
			
			var url_province_sel = "{:U('Address/province_list')}?";
			var url_city_sel = "{:U('Address/city_sel')}?";//根据省份获取城市列表
            var url_area_sel = "{:U('Address/area_sel')}?";//根据城市获取地区列
			var url_get_zip = "{:U('Address/get_zip')}?";//根据地区获取邮政编码
			var url_address_add = "{:U('Member/address_add')}?";//添加收货地址请求地址
			
        </script>
               <link rel="stylesheet" type="text/css" href="__PUBLIC__/common/artDialog6/css/ui-dialog.css" />
        <script type="text/javascript" src="__PUBLIC__/common/artDialog6/dist/dialog-plus-min.js"></script>
        <script src="{$theme_path}/js/check.js?v=20190109_1"></script>
        <script src="{$theme_path}/js/member_address_ajax.js?v=20190327_1"></script>
</block>
<block name="body">
<div class="header">
    <div class="clearfix box">
        <a class="return" href="{:urlrotue('Member/address')}"><i class="return-icon"></i></a>
        <h2>修改收货地址</h2>
    </div>
</div>
<!--end header-->
<div class="container pt50">

    <div class="wjmm">
        <dl>
            <dd class="clearfix">
                <input type="text"   id="realname" name="realname" class="text2"  value="{$model.realname}" placeholder="收件人"/>
            </dd>
            <dd class="clearfix">
                <input type="text" class="text2"  name="phone" id="phone"  value="{$model.phone}" placeholder="手机号"/>
            </dd>
        </dl>
        <dl>
       
      
            <dd > <select name="province" id="province" class="share_sel_1">
                                        <option value="">选择省份</option>
                                        <foreach name="province" item="prov">
                                            <option value="{$prov.province}">{$prov.province}</option>
                                        </foreach>
                                    </select>
                                </span>
                                <span id="span_city"></span>
                                <span id="span_area"></span>
                                <input type="hidden" id="hid_province" name="hid_province" value="{$model.province}" />
                                <input type="hidden" id="hid_city" name="hid_city" value="{$model.city}" />
                                <input type="hidden" id="hid_area" name="hid_area" value="{$model.area}" /></dd>
            <dd class="clearfix">
                <input type="text"  name="address" id="address" value="{$model.address}" class="text2" placeholder="详细地址"/>
            </dd>
            <dd class="clearfix">
                <input type="text" name="zip" id="zip"  value="{$model.zip}" class="text2" placeholder="邮政编码"/>
            </dd>
            <dd class="clearfix"><input type="checkbox" name="is_default" id="is_default" value="1" <if condition="$model.is_default eq 1"> checked="checked"</if> />设为默认</dd>
              <input type="hidden" name="id" id="id" value="{$model.id}" />
        </dl>
        <div class="wjmm-sub">
        </div>
    </div>
</div>
<div class="footer-loc">
    <a class="new-loc" id="btn_edit">保存</a>
</div>
<!--弹出新增地址窗-->
<div class="loc-select">
    <i class="close "><img src="{$theme_path}/images/close_icon1.png" width="25"/> </i>
    <div class="title1" id="had_selected">请选择</div>

    <div class="title">选择省市/地区</div>
    <div class="place-cell2" id="province_city_area">
    
    </div>
</div>

</block>
<block name="footer"></block>
<block name="otherjs">
<script type="text/javascript">
 $('#loc-select').click(function () {
			$("#province_city_area").load(url_province_sel);//获得省份列表
            $('.loc-select').fadeIn();

    })
	    $('.close').click(function () {
            $('.loc-select').fadeOut();
        })
</script>
</block>



